'use strict';
module.exports = app => {
  const { INTEGER, STRING } = app.Sequelize;
    return app.model.define(
      'travelMode',
      {
            id: {type: INTEGER, primaryKey: true, autoIncrement: true},
            name: {type: STRING(255), allowNull: true, comment: '城市名称'},
            start_km: {type: INTEGER, allowNull: true, comment: '起步km数'},
            start_price: {type: INTEGER, allowNull: true, comment: '起步价格'},
            over_km_price: {type: INTEGER, allowNull: true, comment: '超出每km价格'},
            status: {type: INTEGER, allowNull: true, comment: '状态'},
            sort: {type: INTEGER, allowNull: true, comment: '排序'},
            is_del: {type: INTEGER, allowNull: true, comment: '是否删除'},
      },
      {
          tableName: 'travel_mode',
          timestamps: true, // 启用时间戳(createdAt, updatedAt)
          updatedAt: 'updated_time', // 不想要 updatedAt
          createdAt: 'create_time', // 想要  createdAt 但是希望名称叫做 created_at
      }
  );
};
